package com.example.sale.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sale.True.Feedback;
import com.example.sale.True.UserDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface FeedbackMapper  extends BaseMapper<Feedback> {
    @Select("SELECT * FROM feedback WHERE userid = #{userid}")
    Feedback getFeedbackById(@Param("userid") Integer userid);
    @Delete("DELETE FROM feedback WHERE userid = #{userid}")
    Boolean removeFeedbackById(@Param("userid") Integer userid);
    @Select("SELECT COUNT(*)from feedback where  resolved = #{resolved}")
    Integer ResolvedNumber(@Param("resolved") String resolved);

}
